<?php

use Illuminate\Database\Schema\Blueprint;

class CreateRoles extends \App\Utils\CreateMigration
{

    function columns(Blueprint $table)
    {
        $table->string('name', 50)->comment('角色名称');
        $table->string('tag', 50)->comment('角色编码');
        $table->string('desc')->nullable()->comment('备注');
        $table->unique(['deleted_at', 'tag'], 'index_deleted_tag');

    }

    function tableInfo()
    {
        return ['roles','角色'];
    }
}
